<!DOCTYPE html>
<html>
<head>
  <title>WolkenWebShop</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>
	<h1>WebShop</h1>
	<br>

	<ul id="Navigation">
		<li><%= link_to 'Startseite', root_path %></li>
		<li><%= link_to 'Produkt-Katalog', "/produkt_katalog/index"%></li>
		<li><%= link_to 'Benutzer-Seite', "/user/index"%></li> 
	</ul>
	
	<div id="Warenkorb">
<!--		<h3> Login-Bereich </h3>
		<br> -->
		
		<h3> Warenkorb </h3> 
		<% sum = 0 %> 
		<%  $warenkorbListe.each_with_index do |element,index|  %> 
			<% sum += element.preis %> 
       <li> <!-- <%= "#{element.name}: #{element.preis} €" %> --> 
       			<%= form_tag("/produkt_katalog/delete",:controller => "ProduktKatalog" , :method => "post") do %> 
       			<%= "#{element.name}: #{element.preis} €" %>
				<%= hidden_field_tag "deleteInput",  index %> 
				<%= submit_tag("-") %>
				<% end %>
				
				
				


       </li>
    <% end %>
		<br>
		Summe: <%= sum  %> €  
		<br>
		<br>
		<%= link_to 'Zur Kasse', "/kasse/index"%>
	</div>


<!-- Google Analytics JS-Snippet für den Web-Analytics-Teil --> 

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-37658753-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>


	
<%= yield %>

</body>



</html>
